With some network devices, communication between an ingress port of the network device and an egress port of the network device may be possible via multiple available routes through the network device. Such communication is embodied in a sequence of transmitted data packets or a “flow” between the ingress port and the egress port, wherein the flow typically represents a single session or data exchange within a specific protocol. The flow enters the network device at the ingress port and leaves the network device at the egress port.
In cases where multiple routes exist for a flow, when the ingress port receives a packet associated with that flow, the network device determines whether a route though the network device has already been assigned to the flow. If a route has already been assigned, the network device transmits the packet through the network device corresponding to the assigned route. If a route has not already been assigned, the network device selects one of the available routes over which to transmit the flow and records the selected route corresponding to the flow.
Typically, such a selection is performed randomly and/or without significant knowledge of downstream network characteristics, and therefore the selected route may not offer the best performance. In other words, in some circumstances, another available route through the network device may have provided better performance but might not be selected. In such cases, after that initial selection, the flow is fixed to the lower performance route for the flow's duration. For example, a flow may be routed through a part of the network device that includes slow processors and/or congested links, while other routes were available that do not include such slow processors or congested links. Yet, by virtue of the initial route selection, the flow remains bound to the slower route until its completion. Such route selection can result in non-optimal routing, particularly for latency-sensitive flows.
Further, network device performance can change as the traffic through various network links within the network device changes. Therefore, even if an optimal route is initially selected for a given flow, the route may later change to have excessive latency while other routes could provide a lower latency. However, no solutions exist to determine network packet latency times for traversal of the packet through the network device. And no solutions exist to dynamically adjust routing based on latency distributions and changes in a network device. Accordingly, a need exists in the art for an improved solution for network packet latency measurement.